const {http} = require("../../utils/http")
Page({
  data: {
    musics:[]
  },
  onLoad: function (options) {
    var url = `http://47.108.197.28:3000/mv/first`;
    http({
      url,
      success: res => {
        var musics = []
        var data = res.data.data;
        data.forEach(item => {
          var { name, cover,id } = item;
          musics.push({
            name,
            cover,
            id
          })
        })
        console.log(musics)
        this.setData({
          musics
        })
      }
    })
  },
})
